package  
{
	import net.flashpunk.Entity;
	import net.flashpunk.graphics.Image;
	import net.flashpunk.masks.Pixelmask;
	import net.flashpunk.utils.Input;
	
	/**
	 * ...
	 * @author Donatello
	 */
	public class Car extends Entity
	{
		[Embed(source = "img/cars/car1.png")]	private const IMG_CAR:Class;
		private var imgCar:Image;
		
		public function Car(px:Number,py:Number) 
		{
			
			imgCar = new Image(IMG_CAR);
			
			graphic=imgCar;
			
			mask = new Pixelmask(IMG_CAR);
			type = "Car";
			
			x = px;
			y = py;
		
			
		}
		
		
		override public function update():void
		{
			if (Input.mouseDown)
			{
				x += 5
			}
			else
			{	
				x -=5;
			}
			y -= 0.5;
			
		}
			
	}

}